package com.un.ebs.inventory.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.stereotype.Component;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 * @author liubo
 * @since 2020-05-23
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@Component
@TableName("tb_inventory_log")
public class InventoryLog extends Model<InventoryLog> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.UUID)
    private String id;

    private String inventoryId;

    private String noteItemId;

    private Integer outInFlag;

    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    private Double currQty;

    private Double preQty;

    private Double afterQty;

    private Double currLockByOutQty;

    private Double currLockByInQty;

    private Double preLockByOutQty;

    private Double preLockByInQty;

    private Double afterLockByOutQty;

    private Double afterLockByInQty;

    private String tenantId;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}